<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改密码')"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-devInfo-edit" th:object="${devInfo}">
            <input id="infoId" name="infoId" th:field="*{infoId}"  type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">设备ID：</label>
				<div class="col-sm-8">
					<input id="devId" name="devId" th:field="*{devId}" class="form-control" type="text" readonly="readonly" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">所属公司：</label>
				<div class="col-sm-8">
					<select id="companyId" name="companyId"  disabled="disabled"  >
					<option th:each="company : ${companyList}" th:text="${company.orgName}"
							th:value="${company.compId}"    th:field="*{companyId}" ></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">厂商及型号：</label>
				<div class="col-sm-8">
					<input id="devCompany" name="devCompany" th:field="*{devCompany}"   disabled="disabled" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">设备机器号：</label>
				<div class="col-sm-8">
					<input id="devMachineNo" name="devMachineNo" th:field="*{devMachineNo}" readonly="readonly"
						   class="form-control" type="text">
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">适用餐别：</label>
				<div class="col-sm-8">

					<div  class="radio-box"  th:each="dict : ${dishTypeItemList}">
						<input type="checkbox"   th:text="${dict.typeName}"  name="belongType"  th:value="${dict.typeId}"
							   th:checked="${dict.ifSelected}"
						/>
					</div>

				</div>
			</div>

			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
        var prefix = ctx + "dev/devInfo";
		$("#form-devInfo-edit").validate({
            rules:{
                devId:{
                    required:true
                },
                devCompany:{
                    required:true
                },devMachineNo:{
                    required:true
                },
            },
			focusCleanup: true
			, submitHandler: function(form) {
                $.operate.save(prefix + "/edit", $('#form-devInfo-edit').serialize());
            }
		});




	</script>
</body>
</html>
